﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MvcControlsToolkit
{
    public class PieLegendRendererOptions: PieRendererOptions
    {
        /// <summary>
        /// Maximum number of rows in the legend
        /// </summary>
        public int NumberRows
        {
            get
            {
                if (Attributes.ContainsKey("numberRows"))
                    return int.Parse(Attributes["numberRows"]);
                else return 0;
            }
            set { Attributes["numberRows"] = value.ToString().ToLower(); }
        }

        /// <summary>
        /// Maximum number of columns in the legend
        /// </summary>
        public int NumberColumns
        {
            get
            {
                if (Attributes.ContainsKey("numberColumns"))
                    return int.Parse(Attributes["numberColumns"]);
                else return 0;
            }
            set { Attributes["numberColumns"] = value.ToString().ToLower(); }
        }
    }
}
